<?php


namespace App\Http\Controllers\Supplier;

use App\Http\Controllers\Controller;
use App\Services\CommonService;

class BaseVerifyController extends Controller
{

    public function __construct($request='')
    {
        if(empty($request)){
            $request = request();
        }
        $crypt = $request->header("supplierCrypt",'');
        $all = $request->all();
        if(isset($all['file'])){
            unset($all['file']);
        }
      $verify = apiVerify($all,$crypt,CommonService::API_SECRET_KEY);
        $verify = true;
        if(!$verify){
            echo json_encode(['status' => CommonService::HTTP_CODE_FAIL, 'msg' => '数据无权限', 'data' => []],JSON_UNESCAPED_UNICODE);exit;
        }

    }


}
